package com.mercury.pattern._08_composite;

/**
 * 节点
 */
public abstract class ColleageComponent {
    String name;
    String desc;

    public ColleageComponent(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public void add(ColleageComponent component){
        throw new UnsupportedOperationException();
    }

    public void remove(ColleageComponent component){
        throw new UnsupportedOperationException();
    }

    public abstract void print();


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}